class A3
{
    public void fun1()
    {
        System.out.println("A->fun1()");
    }
    public void fun2()
    {
        this.fun1();
    }
}

class B3 extends A3
{
    public void fun1()
    {
        System.out.println("B->fun1()");
    }
    public void fun3()
    {
        System.out.println("B->fun3()");
    }
}

class C3 extends A3
{
    public void fun1()
    {
        System.out.println("C->fun1()");
    }
    public void fun3()
    {
        System.out.println("C->fun3()");
    }
}
public class ZhaiZhiJie03
{
    public static void main(String[] args) {
        fun(new B3());
        fun(new C3());
    }
    public static void fun(A3 a)
    {
        a.fun1();
    }
}
